package edu.szu.huhanpeng.doodlingFight.controller.showController.updateActioner 
{
	import edu.szu.huhanpeng.doodlingFight.model.data.GameData;
	import edu.szu.huhanpeng.doodlingFight.model.GameProxy;
	import edu.szu.huhanpeng.doodlingFight.view.PlayerWindowMed;
	import org.puremvc.as3.interfaces.ICommand;
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.interfaces.INotifier;
	import org.puremvc.as3.patterns.command.MacroCommand;
	import org.puremvc.as3.patterns.command.SimpleCommand;
	
	/**
	 * ...
	 * @author Huhanpeng
	 */
	public class UpdateActionerSc extends SimpleCommand implements ICommand, INotifier 
	{
		override public function execute(note:INotification):void 
		{
			var gameProxy:GameProxy =  facade.retrieveProxy( GameProxy.NAME ) as GameProxy;
			var pOneWindowMed:PlayerWindowMed = facade.retrieveMediator( PlayerWindowMed.P_ONE_NAME ) as PlayerWindowMed;
			var pTwoWindowMed:PlayerWindowMed = facade.retrieveMediator( PlayerWindowMed.P_TWO_NAME ) as PlayerWindowMed;
			
			switch ( gameProxy.actingPlayer ) 
			{
				case GameData.P_ONE:
					pOneWindowMed.light();
					pTwoWindowMed.dark();
					break;
				
				case GameData.P_TWO:
					pOneWindowMed.dark();
					pTwoWindowMed.light();
					break;
				default:
			}
		}
		
		
	}

}